3.7 \(\int \frac{(d+i c d x) (a+b \tan ^{-1}(c x))}{x^3} \, dx\)

Optimal. Leaf size=65 \[ -\frac{d (1+i c x)^2 \left (a+b \tan ^{-1}(c x)\right )}{2 x^2}+i b c^2 d \log (x)-i b c^2 d \log (c x+i)-\frac{b c d}{2 x} \]

[Out]

-(b*c*d)/(2*x) - (d*(1 + I*c*x)^2*(a + b*ArcTan[c*x]))/(2*x^2) + I*b*c^2*d*Log[x] - I*b*c^2*d*Log[I + c*x]

________________________________________________________________________________________

Rubi [A]  time = 0.0552368, antiderivative size = 65, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {37, 4872, 12, 77} \[ -\frac{d (1+i c x)^2 \left (a+b \tan ^{-1}(c x)\right )}{2 x^2}+i b c^2 d \log (x)-i b c^2 d \log (c x+i)-\frac{b c d}{2 x} \]

Antiderivative was successfully verified.

[In]

Int[((d + I*c*d*x)*(a + b*ArcTan[c*x]))/x^3,x]

[Out]

-(b*c*d)/(2*x) - (d*(1 + I*c*x)^2*(a + b*ArcTan[c*x]))/(2*x^2) + I*b*c^2*d*Log[x] - I*b*c^2*d*Log[I + c*x]

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^(n +
1))/((b*c - a*d)*(m + 1)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 4872

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_))^(q_.), x_Symbol] :> With[{u = I
ntHide[(f*x)^m*(d + e*x)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 + c^2*x^
2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, q}, x] && NeQ[q, -1] && IntegerQ[2*m] && ((IGtQ[m, 0] && IGtQ[q, 0
]) || (ILtQ[m + q + 1, 0] && LtQ[m*q, 0]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin{align*} \int \frac{(d+i c d x) \left (a+b \tan ^{-1}(c x)\right )}{x^3} \, dx &=-\frac{d (1+i c x)^2 \left (a+b \tan ^{-1}(c x)\right )}{2 x^2}-(b c) \int \frac{d (-i+c x)}{2 x^2 (i+c x)} \, dx\\ &=-\frac{d (1+i c x)^2 \left (a+b \tan ^{-1}(c x)\right )}{2 x^2}-\frac{1}{2} (b c d) \int \frac{-i+c x}{x^2 (i+c x)} \, dx\\ &=-\frac{d (1+i c x)^2 \left (a+b \tan ^{-1}(c x)\right )}{2 x^2}-\frac{1}{2} (b c d) \int \left (-\frac{1}{x^2}-\frac{2 i c}{x}+\frac{2 i c^2}{i+c x}\right ) \, dx\\ &=-\frac{b c d}{2 x}-\frac{d (1+i c x)^2 \left (a+b \tan ^{-1}(c x)\right )}{2 x^2}+i b c^2 d \log (x)-i b c^2 d \log (i+c x)\\ \end{align*}

Mathematica [C]  time = 0.0547187, size = 88, normalized size = 1.35 \[ -\frac{b c d \text{Hypergeometric2F1}\left (-\frac{1}{2},1,\frac{1}{2},-c^2 x^2\right )}{2 x}-\frac{d \left (a+b \tan ^{-1}(c x)\right )}{2 x^2}-\frac{i c d \left (a+b \tan ^{-1}(c x)\right )}{x}+\frac{1}{2} i b c^2 d \left (2 \log (x)-\log \left (c^2 x^2+1\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[((d + I*c*d*x)*(a + b*ArcTan[c*x]))/x^3,x]

[Out]

-(d*(a + b*ArcTan[c*x]))/(2*x^2) - (I*c*d*(a + b*ArcTan[c*x]))/x - (b*c*d*Hypergeometric2F1[-1/2, 1, 1/2, -(c^
2*x^2)])/(2*x) + (I/2)*b*c^2*d*(2*Log[x] - Log[1 + c^2*x^2])

________________________________________________________________________________________

Maple [A]  time = 0.034, size = 91, normalized size = 1.4 \begin{align*} -{\frac{da}{2\,{x}^{2}}}-{\frac{idca}{x}}-{\frac{db\arctan \left ( cx \right ) }{2\,{x}^{2}}}-{\frac{idcb\arctan \left ( cx \right ) }{x}}-{\frac{i}{2}}{c}^{2}db\ln \left ({c}^{2}{x}^{2}+1 \right ) -{\frac{b{c}^{2}d\arctan \left ( cx \right ) }{2}}-{\frac{bcd}{2\,x}}+i{c}^{2}db\ln \left ( cx \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+I*c*d*x)*(a+b*arctan(c*x))/x^3,x)

[Out]

-1/2*a*d/x^2-I*c*d*a/x-1/2*d*b*arctan(c*x)/x^2-I*c*d*b*arctan(c*x)/x-1/2*I*c^2*d*b*ln(c^2*x^2+1)-1/2*b*c^2*d*a
rctan(c*x)-1/2*b*c*d/x+I*c^2*d*b*ln(c*x)

________________________________________________________________________________________

Maxima [A]  time = 1.49313, size = 101, normalized size = 1.55 \begin{align*} -\frac{1}{2} i \,{\left (c{\left (\log \left (c^{2} x^{2} + 1\right ) - \log \left (x^{2}\right )\right )} + \frac{2 \, \arctan \left (c x\right )}{x}\right )} b c d - \frac{1}{2} \,{\left ({\left (c \arctan \left (c x\right ) + \frac{1}{x}\right )} c + \frac{\arctan \left (c x\right )}{x^{2}}\right )} b d - \frac{i \, a c d}{x} - \frac{a d}{2 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)*(a+b*arctan(c*x))/x^3,x, algorithm="maxima")

[Out]

-1/2*I*(c*(log(c^2*x^2 + 1) - log(x^2)) + 2*arctan(c*x)/x)*b*c*d - 1/2*((c*arctan(c*x) + 1/x)*c + arctan(c*x)/
x^2)*b*d - I*a*c*d/x - 1/2*a*d/x^2

________________________________________________________________________________________

Fricas [A]  time = 3.01925, size = 244, normalized size = 3.75 \begin{align*} \frac{4 i \, b c^{2} d x^{2} \log \left (x\right ) - 3 i \, b c^{2} d x^{2} \log \left (\frac{c x + i}{c}\right ) - i \, b c^{2} d x^{2} \log \left (\frac{c x - i}{c}\right ) +{\left (-4 i \, a - 2 \, b\right )} c d x - 2 \, a d +{\left (2 \, b c d x - i \, b d\right )} \log \left (-\frac{c x + i}{c x - i}\right )}{4 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)*(a+b*arctan(c*x))/x^3,x, algorithm="fricas")

[Out]

1/4*(4*I*b*c^2*d*x^2*log(x) - 3*I*b*c^2*d*x^2*log((c*x + I)/c) - I*b*c^2*d*x^2*log((c*x - I)/c) + (-4*I*a - 2*
b)*c*d*x - 2*a*d + (2*b*c*d*x - I*b*d)*log(-(c*x + I)/(c*x - I)))/x^2

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)*(a+b*atan(c*x))/x**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.14698, size = 123, normalized size = 1.89 \begin{align*} -\frac{b c^{2} d i x^{2} \log \left (c i x + 1\right ) + 3 \, b c^{2} d i x^{2} \log \left (-c i x + 1\right ) - 4 \, b c^{2} d i x^{2} \log \left (x\right ) + 4 \, b c d i x \arctan \left (c x\right ) + 4 \, a c d i x + 2 \, b c d x + 2 \, b d \arctan \left (c x\right ) + 2 \, a d}{4 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)*(a+b*arctan(c*x))/x^3,x, algorithm="giac")

[Out]

-1/4*(b*c^2*d*i*x^2*log(c*i*x + 1) + 3*b*c^2*d*i*x^2*log(-c*i*x + 1) - 4*b*c^2*d*i*x^2*log(x) + 4*b*c*d*i*x*ar
ctan(c*x) + 4*a*c*d*i*x + 2*b*c*d*x + 2*b*d*arctan(c*x) + 2*a*d)/x^2